home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Tools / Languages / MacHaskell 2.2 / com / clisp / savesys < prev   
Encoding:
Text File  |  1994-09-27  |  1.4 KB  |  46 lines  |  [TEXT/ttxt]

  1. #!/bin/sh
  2. # savesys -- build a saved executable in bin/new-clisp-haskell
  3. #
  4. cd $Y2
  5. export PRELUDEBIN=$Y2/progs/prelude/clisp
  6. $CLISP <<EOF
  7. (load "cl-support/cl-init.lisp")
  8. ;; Turn off various compiler/loader messages.
  9. (setf *load-verbose* nil)
  10. (setf *compile-verbose* nil)
  11. (in-package "MUMBLE-USER")
  12. (setf *printers* '(compiling loading))
  13. (setf *compile-interface* '#t)
  14. (setf *interface-code-quality* 1)
  15. (setf *code-chunk-size* 20)
  16. ;; Load the prelude.
  17. (compile/load *prelude-unit-filename*)
  18. ;; CLISP doesn't have a condition system. We use the good old catch and throw.
  19. (setf *modules-loaded* '())
  20. (define (haskell-toplevel)
  21.   (setf lisp:*package* (lisp:find-package "MUMBLE-USER"))
  22.   (use-vanilla-interface)
  23.   ;; CLISP can't handle a pathname like .yhaskell
  24.   (load-init-file "$HASKELL/yhaskell.scm")
  25.   (load-init-file "~/yhaskell.scm")
  26.   (do () ('#f)
  27.     (lisp:catch 'restart-haskell
  28.       (heval)
  29. ) ) )
  30. (define (restart-haskell . args)
  31.   (lisp:throw 'restart-haskell '#f)
  32. )
  33. ;; Have to do set-up of top-level driver by hand before calling savemem.
  34. (setf lisp:*driver* (function haskell-toplevel))
  35. (setf lisp:*break-driver* (function restart-haskell))
  36. ;; Set up the saved system.
  37. (lisp:savemem "bin/new-clisp-haskell.mem")
  38. ;; CLISP exits automatically on eof.
  39. EOF
  40. psubs='"$''@"'
  41. cat > bin/new-clisp-haskell <<EOF
  42. #!/bin/sh
  43. exec $CLISP -q -m 10MB -M $Y2/bin/new-clisp-haskell.mem $psubs
  44. EOF
  45. chmod a+x bin/new-clisp-haskell
  46.